/*
 * @Descripttion:
 * @Author: voanit
 * @Date: 2022-09-01 09:23:15
 * @LastEditors: voanit
 * @LastEditTime: 2022-09-01 10:44:58
 */
import {
  createRouter,
  createWebHashHistory,
  createWebHistory,
} from 'vue-router'

// 1. 创建路由
const router = createRouter({
  // 创建history模式的路由
  history: createWebHistory(),
  // 创建hash模式的路由
  // history: createWebHashHistory(),
  // 配置路由规则
  routes: [
    { path: '/home/:name/:id', component: () => import('../pages/Home.vue') },
    {
      path: '/login/:gender',
      name: 'login',
      component: () => import('../pages/Login.vue'),
    },
  ],
})

export default router
